package com.lcredu;

import com.lcredu.dao.StudentInfoDAO;
import com.lcredu.dao.impl.StudentInfoDAOImpl;
import com.lcredu.entity.StudentInfo;

import java.sql.SQLException;
import java.util.List;

public class Test {
    public static void main(String[] args) throws SQLException {
        StudentInfoDAO studentInfoDAO = new StudentInfoDAOImpl();
//        if (studentInfoDAO.add(new StudentInfo("张三","女",25,"湖南省永州市","133@163.com"))){
//            System.out.println("ok");
//        }else {
//            System.out.println("no");
//        };

        List<StudentInfo> all = studentInfoDAO.getAll();
        for (StudentInfo studentInfo : all) {
            System.out.println(studentInfo);
        }


        System.out.println("------------------");
        StudentInfo studentInfo = studentInfoDAO.getStudentInfoById(1);
        System.out.println(studentInfo);
    }
}
